package packing;

import geometric3D.BoxShape;
import geometric3D.Point;
import geometric3D.XYRectangle;
import geometric3D.XZRectangle;
import geometric3D.YZRectangle;

public class Container extends BoxShape {

	private int weightLimit = 0;
	
	public Container(int width, int length, int height, int weightLimit) {
		super(width, length, height);
		this.weightLimit = weightLimit ;
	}
	
	public Container(){}

	@Override
	public String toString() {
		return "Container [height = " + height + ", length = " + length
				+ ", width = " + width + ", weight limit = "+weightLimit+"]";
	}
	public XYRectangle getXYRectangle(boolean isPositiveFaced){
		
		if(isPositiveFaced){
			Point position = new Point(0,0,height);
			return new XYRectangle(position, this.width, this.length, true);
			
		}else{
			Point position = new Point(0,0,0);
			return new XYRectangle(position, this.width, this.length, true);
		}
		
	}
	
	public XZRectangle getXZRectangle(boolean isPositiveFaced){
		Point position ;
		if(isPositiveFaced){
			position= new Point(0,length,0);
		}else {
			position = new Point(0,0,0);
		}
		return new XZRectangle(position, this.width, this.height,isPositiveFaced);
	}
	public YZRectangle getYZRectangle (boolean isPositiveFaced){
		Point position ;
		if(isPositiveFaced){
			position = new Point(width, 0, 0);
		}else{
			position = new Point(0, 0, 0);
		}
		return new YZRectangle(position, this.length, this.height, isPositiveFaced);
	}
	public int getWeightLimit(){
		return this.weightLimit ;
	}
	
	

}
